import Vue from 'vue'
import Router from 'vue-router'
import manager from '@/components/manager'
import waiter from '@/components/waiter'
import login from '@/components/login'
import zf from '@/components/zf'
import vipadd from '@/components/children/vipadd'
import vipall from '@/components/children/vipall'
import staffadd from '@/components/children/staffadd'
import staffall from '@/components/children/staffall'
import addtype from '@/components/children/addtype'
import adddish from '@/components/children/adddish'
import table from '@/components/children/table'
import updatekc from '@/components/children/updatekc'
import diancan from '@/components/children/diancan'
import updateprice from '@/components/children/updateprice'
Vue.use(Router)
const router = new Router({
	routes: [{
			path: "/manager",
			name: "manager",
			component: manager,
			children: [{
				path: "/vipadd",
				name: "vipadd",
				component: vipadd
			},{
				path: "/vipall",
				name: "vipall",
				component: vipall	
			},{
				path: "/staffadd",
				name: "staffadd",
				component: staffadd	
			},{
				path: "/staffall",
				name: "staffall",
				component: staffall	
			},{
				path: "/addtype",
				name: "addtype",
				component: addtype
			},{
				path: "/adddish",
				name: "adddish",
				component: adddish
			},{
				path: "/table",
				name: "table",
				component: table
			},{
				path: "/updatekc",
				name: "updatekc",
				component: updatekc
			},{
				path: "/diancan",
				name: "diancan",
				component: diancan
			},{
				path: "/updateprice",
				name: "updateprice",
				component: updateprice
			}]
		},{
			path: "/waiter",
			name: "waiter",
			component: waiter,
			children: [{
				path: "/vipadd",
				name: "vipadd",
				component: vipadd
			},{
				path: "/vipall",
				name: "vipall",
				component: vipall	
			},{
				path: "/staffadd",
				name: "staffadd",
				component: staffadd	
			},{
				path: "/staffall",
				name: "staffall",
				component: staffall	
			},{
				path: "/addtype",
				name: "addtype",
				component: addtype
			},{
				path: "/adddish",
				name: "adddish",
				component: adddish
			},{
				path: "/table",
				name: "table",
				component: table
			},{
				path: "/updatekc",
				name: "updatekc",
				component: updatekc
			},{
				path: "/diancan",
				name: "diancan",
				component: diancan
			},{
				path: "/updateprice",
				name: "updateprice",
				component: updateprice
			}]
		},
		{
			path: "/login",
			name: "login",
			component: login
		},
		{
			path: "/",
			redirect: "login"
		},
		{
			path: "/zf",
			name: "zf",
			component: zf
		}
	]
});

export default router;